<?php $this->load->view('common/default_header.php');?>
<?php $this->load->view('common/invite_nav.php');?>
<section class="trade">
    <ul class="trade-head">
        <li class="br text-center">
            <h4>本月收入</h4>
            <h2>￥<?php echo $month_earn;?></h2>
        </li>
        <li class="text-center">
            <h4>总收入</h4>
            <h2>￥ <?php echo $earn;?></h2>
        </li>
        <div class="clear"></div>
    </ul>
    <div class="table-responsive">
        <table class="table table-striped">
            <tr>
                <th>日期</th>
                <th>交易总额</th>
                <th>佣金比例</th>
                <th>我的收入</th>
            </tr>
            <?php 
                if(!empty($day_data)){
                foreach($day_data as $date=>$items){
            ?>
                <tr>
                    <td><?php echo date("m-d",strtotime($date));?></td>
                    <td><?php echo $items['trade_cny'];?></td>
                    <td><?php echo $items['rate']*100;?>%</td>
                    <td>+<?php echo $items['earn'];?></td>
                </tr>
            <?php }?>
            <?php }else{?>
                <tr>
                    <td colspan="5">暂无记录</td>
                </tr>
            <?php }?>
        </table>
    </div>
</section>

<?php $this->load->view('common/wx_share.php');?>